Optimal. Leaf size=42 \[ \frac {\text {ArcTan}(\sinh (c+d x))}{2 a d}+\frac {i}{2 d (a+i a \sinh (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {2746, 46, 212}
\begin {gather*} \frac {\text {ArcTan}(\sinh (c+d x))}{2 a d}+\frac {i}{2 d (a+i a \sinh (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 46
Rule 212
Rule 2746
Rubi steps
\begin {align*} \int \frac {\text {sech}(c+d x)}{a+i a \sinh (c+d x)} \, dx &=-\frac {(i a) \text {Subst}\left (\int \frac {1}{(a-x) (a+x)^2} \, dx,x,i a \sinh (c+d x)\right )}{d}\\ &=-\frac {(i a) \text {Subst}\left (\int \left (\frac {1}{2 a (a+x)^2}+\frac {1}{2 a \left (a^2-x^2\right )}\right ) \, dx,x,i a \sinh (c+d x)\right )}{d}\\ &=\frac {i}{2 d (a+i a \sinh (c+d x))}-\frac {i \text {Subst}\left (\int \frac {1}{a^2-x^2} \, dx,x,i a \sinh (c+d x)\right )}{2 d}\\ &=\frac {\tan ^{-1}(\sinh (c+d x))}{2 a d}+\frac {i}{2 d (a+i a \sinh (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 30, normalized size = 0.71 \begin {gather*} \frac {\text {ArcTan}(\sinh (c+d x))+\frac {1}{-i+\sinh (c+d x)}}{2 a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 74 vs. \(2 (36 ) = 72\).
time = 1.22, size = 75, normalized size = 1.79
method | result | size |
risch | \(\frac {{\mathrm e}^{d x +c}}{\left ({\mathrm e}^{d x +c}-i\right )^{2} d a}-\frac {i \ln \left ({\mathrm e}^{d x +c}-i\right )}{2 a d}+\frac {i \ln \left ({\mathrm e}^{d x +c}+i\right )}{2 a d}\) | \(64\) |
derivativedivides | \(\frac {\frac {i \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )}{2}-\frac {i}{\left (-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}-\frac {i \ln \left (-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-\frac {1}{-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}}{a d}\) | \(75\) |
default | \(\frac {\frac {i \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )}{2}-\frac {i}{\left (-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}-\frac {i \ln \left (-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-\frac {1}{-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}}{a d}\) | \(75\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 87 vs. \(2 (34) = 68\).
time = 0.26, size = 87, normalized size = 2.07 \begin {gather*} -\frac {2 \, e^{\left (-d x - c\right )}}{-2 \, {\left (-2 i \, a e^{\left (-d x - c\right )} - a e^{\left (-2 \, d x - 2 \, c\right )} + a\right )} d} - \frac {i \, \log \left (e^{\left (-d x - c\right )} + i\right )}{2 \, a d} + \frac {i \, \log \left (i \, e^{\left (-d x - c\right )} + 1\right )}{2 \, a d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 102 vs. \(2 (34) = 68\).
time = 0.37, size = 102, normalized size = 2.43 \begin {gather*} \frac {{\left (i \, e^{\left (2 \, d x + 2 \, c\right )} + 2 \, e^{\left (d x + c\right )} - i\right )} \log \left (e^{\left (d x + c\right )} + i\right ) + {\left (-i \, e^{\left (2 \, d x + 2 \, c\right )} - 2 \, e^{\left (d x + c\right )} + i\right )} \log \left (e^{\left (d x + c\right )} - i\right ) + 2 \, e^{\left (d x + c\right )}}{2 \, {\left (a d e^{\left (2 \, d x + 2 \, c\right )} - 2 i \, a d e^{\left (d x + c\right )} - a d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {i \int \frac {\operatorname {sech}{\left (c + d x \right )}}{\sinh {\left (c + d x \right )} - i}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 104 vs. \(2 (34) = 68\).
time = 0.44, size = 104, normalized size = 2.48 \begin {gather*} -\frac {\frac {i \, \log \left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )} - 2 i\right )}{a} - \frac {i \, \log \left (i \, e^{\left (d x + c\right )} - i \, e^{\left (-d x - c\right )} - 2\right )}{a} + \frac {-i \, e^{\left (d x + c\right )} + i \, e^{\left (-d x - c\right )} - 6}{a {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )} - 2 i\right )}}}{4 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.10, size = 74, normalized size = 1.76 \begin {gather*} \frac {\mathrm {atan}\left (\frac {{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\,\sqrt {a^2\,d^2}}{a\,d}\right )}{\sqrt {a^2\,d^2}}+\frac {1}{a\,d\,\left ({\mathrm {e}}^{c+d\,x}-\mathrm {i}\right )}-\frac {1{}\mathrm {i}}{a\,d\,{\left (1+{\mathrm {e}}^{c+d\,x}\,1{}\mathrm {i}\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________